package com.mall.service.authority.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.mall.commons.common.CommonPage;
import com.mall.commons.common.CommonResult;
import com.mall.model.domain.UmsMemberLevel;
import com.mall.service.authority.mapper.UmsMemberLevelMapper;
import com.mall.service.authority.service.UmsMemberLevelService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;


@Service
public class UmsMemberLevelServiceImpl extends ServiceImpl<UmsMemberLevelMapper,UmsMemberLevel> implements UmsMemberLevelService {

    @Autowired
    UmsMemberLevelMapper umsMemberLevelMapper;

    @Override
    public List<UmsMemberLevel> findMemberLevel(Integer defaultStatus) {
        LambdaQueryWrapper<UmsMemberLevel> queryWrapper = new LambdaQueryWrapper<>();
        queryWrapper.eq(UmsMemberLevel::getDefaultStatus,defaultStatus);
        List<UmsMemberLevel> umsMemberLevels = umsMemberLevelMapper.selectList(queryWrapper);
        return umsMemberLevels;
    }
}